#ifndef __ONEWIRE_H__
#define __ONEWIRE_H__

#include "STC15F2K60S2.h"
#include "intrins.h"

sbit OneWire_DQ = P1^4;  //单总线I/O口

#define uint unsigned int
#define uchar unsigned char

void Delay_OneWire(unsigned int t);		//单总线延时函数
bit  OneWire_Init(void);
void WriteByte_DS18B20(unsigned char dat);
unsigned char ReadByte_DS18B20(void);

float DS18B20_GetTemperature(void); //DS18B20读取温度


#endif
